'''
Created on 03.06.2013

@author: Cornelius
'''
from libavg import avg

class HomeScreen(avg.DivNode):
    '''
    classdocs
    '''
    
	#init lobbyScreen(all Nodes)
    def __init__(self, sizeparam, parentparam):
        '''
        Constructor
        '''
        super(HomeScreen, self).__init__(size=sizeparam)
        self.registerInstance(self, parentparam)
        '''self.__node = avg.DivNode(size=sizeparam, parent=parentparam) '''
        self.__rect1 = avg.RectNode(pos=(0,0),size=sizeparam,  fillopacity=1,
                                     fillcolor="FFFFFF",  color="FFFFFF", parent=self)
        self.__backgroundnode = avg.ImageNode(id="background", href="images/background_vertical.png", pos=(sizeparam[0]/2,0), parent=self, size=(sizeparam[0]/2,sizeparam[1]))
        self.__bombnode = avg.ImageNode(id="bomb", href="images/bomb.png", pos=(sizeparam[0]*1/8,sizeparam[1]*2/5), parent=self, size=(sizeparam[1]/2,sizeparam[1]/2) )
        self.__qrnode = avg.ImageNode(id="qr", href="images/qrcode.png", pos=(sizeparam[0]*1/8+sizeparam[0]*1/14,sizeparam[1]*2/5+sizeparam[1]*1/11), parent=self, size=(sizeparam[1]/2-sizeparam[1]*1/4,sizeparam[1]/2-sizeparam[1]*1/4) )
        self.__textnode = avg.WordsNode(pos=(sizeparam[0]*1/16,sizeparam[1]*1/8),font="calibri", variant="bold", text="Bomberman", color="000000", fontsize=sizeparam[1]/10, parent=self)
        self.__textnode2 = avg.WordsNode(pos=(self.__textnode.pos[0]+sizeparam[0]*1/32,self.__textnode.pos[1]+sizeparam[1]/10),font="calibri", variant="", text="Jetzt Spielen!", color="000000", fontsize=sizeparam[1]/20, parent=self)
        